<table cellspan='1' cellpadding='1' border='0'>
  <tr>
    <th colspan='4'>
      <%= link_to_remote '上一日<<', 
            :update => 'heart_beats',
            :url => stat_tools_site_healths_url(
              :id => @setting.id,
              :how_many_days_ago => (@how_many_days_ago + 1)
            ),
            :method => :get,
            :html => {
              :title => "看#{(@how_many_days_ago + 1).days.ago.to_date}的综合分析",
              :class => :pre_day
            }            
        %>
      <%= @setting.name %>-<%= @how_many_days_ago == 0 ? '今日' : l(@how_many_days_ago.days.ago.to_date, :format => :short) %>-把脉记录
      <%= link_to_remote '>>下一日', 
            :update => 'heart_beats',
            :url => stat_tools_site_healths_url(
              :id => @setting.id,
              :how_many_days_ago => (@how_many_days_ago - 1)
            ),
            :method => :get,
            :html =>{
              :title => "看#{(@how_many_days_ago - 1).days.ago.to_date}的综合分析" ,
              :class => :next_day
            } if(@how_many_days_ago > 0)
      %>
    </th>
  </tr>
  <tr>
    <th width='80'>序号</th>
    <th width='200'>时间</th>
    <th width='200'>类型</th>      
    <th width='300'>响应时间</th>      
  </tr>  
  <% if @heart_beats.any? %>
    <% @heart_beats.each_with_index do |beat, index| %>
    <tr>
      <td><%= index %></td>
      <td><%= l beat.created_at, :format => :short %></td>
      <td>
        <b style="<%= beat.is_a?(SiteHeartBeat::Available) ? 'color:#197325' : 'color:red' %>">
          <%= beat.type_name %>
        </b>
      </td>
      <td><%= beat.response_time %>ms</td>    
    </tr>
    <% end %>
  <% else %>
  <tr>
    <td colspan='4'>无记录</td>
  </tr>
  <% end %>  
</table>    